<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"vchao.top","root":"/","scheme":"Muse","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
  </script>

  <meta name="description" content="仿佛是一夜之间，突然就好多人都在讨论Kotlin，一下子就把我弄懵逼了，这是个什么东东？？然后各种百度，看各种大佬的文章，最后整理成了自己的理解。这篇文章就来简单讲一下，不对的地方，欢迎大家指出来。 百度百科：Kotlin    1.Kotlin 是一个基于 JVM 的新的编程语言，由 JetBrains 开发。Kotlin可以编译成Java字节码，也可以编译成JavaScript，方便在没有JV">
<meta property="og:type" content="article">
<meta property="og:title" content="Kotlin是个什么东东？">
<meta property="og:url" content="http://vchao.top/2017/05/12/Kotlin%E6%98%AF%E4%B8%AA%E4%BB%80%E4%B9%88%E4%B8%9C%E4%B8%9C%EF%BC%9F/index.html">
<meta property="og:site_name" content="乘风破浪">
<meta property="og:description" content="仿佛是一夜之间，突然就好多人都在讨论Kotlin，一下子就把我弄懵逼了，这是个什么东东？？然后各种百度，看各种大佬的文章，最后整理成了自己的理解。这篇文章就来简单讲一下，不对的地方，欢迎大家指出来。 百度百科：Kotlin    1.Kotlin 是一个基于 JVM 的新的编程语言，由 JetBrains 开发。Kotlin可以编译成Java字节码，也可以编译成JavaScript，方便在没有JV">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2017-05-12T12:03:39.000Z">
<meta property="article:modified_time" content="2021-08-25T14:37:20.795Z">
<meta property="article:author" content="vchao">
<meta property="article:tag" content="Android">
<meta property="article:tag" content="Kotlin">
<meta name="twitter:card" content="summary">

<link rel="canonical" href="http://vchao.top/2017/05/12/Kotlin%E6%98%AF%E4%B8%AA%E4%BB%80%E4%B9%88%E4%B8%9C%E4%B8%9C%EF%BC%9F/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>Kotlin是个什么东东？ | 乘风破浪</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">乘风破浪</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://vchao.top/2017/05/12/Kotlin%E6%98%AF%E4%B8%AA%E4%BB%80%E4%B9%88%E4%B8%9C%E4%B8%9C%EF%BC%9F/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="vchao">
      <meta itemprop="description" content="怀揣好奇，梦想改变世界的菜鸟极客">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="乘风破浪">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          Kotlin是个什么东东？
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2017-05-12 20:03:39" itemprop="dateCreated datePublished" datetime="2017-05-12T20:03:39+08:00">2017-05-12</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2021-08-25 22:37:20" itemprop="dateModified" datetime="2021-08-25T22:37:20+08:00">2021-08-25</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Android/" itemprop="url" rel="index"><span itemprop="name">Android</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <p>仿佛是一夜之间，突然就好多人都在讨论Kotlin，一下子就把我弄懵逼了，这是个什么东东？？然后各种百度，看各种大佬的文章，最后整理成了自己的理解。这篇文章就来简单讲一下，不对的地方，欢迎大家指出来。</p>
<h2 id="百度百科："><a href="#百度百科：" class="headerlink" title="百度百科："></a>百度百科：</h2><p><strong>Kotlin</strong><br>    1.Kotlin 是一个基于 JVM 的新的编程语言，由 JetBrains 开发。Kotlin可以编译成Java字节码，也可以编译成JavaScript，方便在没有JVM的设备上运行。<br>    2. JetBrains，作为目前广受欢迎的Java IDE IntelliJ 的提供商，在 Apache 许可下已经开源其Kotlin 编程语言。Kotlin已正式成为Android官方开发语言。</p>
<h2 id="官方资料"><a href="#官方资料" class="headerlink" title="官方资料"></a>官方资料</h2><p>了解Kotlin的话，还是推荐大家先从官方资料入手。别人的理解多少总会有些偏差的。</p>
<ul>
<li>首发kotlin的官方github地址了：<a target="_blank" rel="noopener" href="https://github.com/JetBrains/kotlin">github地址</a></li>
<li>英语不好的话，就乖乖看官方中文翻译站点吧：<a target="_blank" rel="noopener" href="https://www.kotlincn.net/docs/reference/">官方中文翻译</a></li>
</ul>
<h2 id="鸿洋大神："><a href="#鸿洋大神：" class="headerlink" title="鸿洋大神："></a>鸿洋大神：</h2><ol>
<li>有着扎实的Java基础，这东西学习起来肯定是可以速成的，所以不要惊慌，如果有着原本的学习计划，也不用着急着打乱自己原本的节奏（不反对立即开始学习的哈，为爱学习的点赞）~</li>
<li>一个新的语言想要快速的普及，那么可能只有在运行效率上提升那才是最大的优势，如果说：“XX语言被Android官方支持，运行速度比原本提升50%”，那么不用想，立即去学习（Kotlin并不具备这样的属性，而且其所表现出类似于“简洁”这样的优势，短期内在一个多年Java的开发者面前，是体现不出来的）。</li>
<li>所以，Kotlin肯定是值得学习的，但并没有传的那么夸张。有精力就去学习，有自己的学习计划也可以放一放。</li>
<li>我想只有用得多了，Kotlin的优势应该会慢慢展现出来的，但是应该需要一个较为漫长的过渡期（如果有公司内部支持，那么这个过程肯定很快）~</li>
</ol>
<p>然后鸿洋大神推荐了好多Kotlin的学习资料~~恩，大家有意愿的可以戳这里。<a target="_blank" rel="noopener" href="http://mp.weixin.qq.com/s?__biz=MzAxMTI4MTkwNQ==&mid=2650823035&idx=1&sn=2db4eea9eb569bf375f847f36b1229fa&chksm=80b78de5b7c004f3c3f0a54b535671971f91708def1faecb4b1a4628bb7efb9d00392f11beca&mpshare=1&scene=1&srcid=0519TOOTzQt3M6JPHUknxKC9#rd">学习Kotlin吗？</a></p>
<h2 id="张涛大神"><a href="#张涛大神" class="headerlink" title="张涛大神"></a>张涛大神</h2><p>1.如果一门编程语言不足以改变你的编程思维，那么它是失败的。我们已经熟练了C、Obj-C、JAVA等静态语言，是时候学习一下Swift、Go、Kotlin这种动态语言了（只是语法上类似动态语言的语法）。<br>2.第二个原因，Kotlin确实能省略许多的代码编写，以及它特有的语言特性。 第三个原因，与Sala、Go等相比，Kotlin能够完美兼容现有的Java代码，也就是说，像我们平时使用的Volley、KJFrameForAndroid、OKHttp等开发框架，在Kotlin语言下依旧能正常运行。</p>
<p>恩，附上张涛大神的博客地址。里面好多kotlin的教程。<a target="_blank" rel="noopener" href="https://kymjs.com/column/kotlin.html">开源实验室</a></p>
<h2 id="大精-wing的地方酒馆"><a href="#大精-wing的地方酒馆" class="headerlink" title="大精-wing的地方酒馆"></a>大精-wing的地方酒馆</h2><pre><code>至于Kotlin是什么，简单的说就是跑在jvm上的新语言，他的特点就是短小 ~~快~~，至于有什么好处，那就说不完啊，挑特点来说。
1.无缝对接java，可以java代码和kotlin代码互相调用
2.一键java转kotlin，如果你有遗留的java代码，可以一键转换
3.函数扩展功能，再也不知道啥叫继承
</code></pre>
<p><a target="_blank" rel="noopener" href="http://androidwing.net/index.php/89">让你的代码量减少3倍！使用kotlin开发Android系列</a></p>
<h2 id="我的理解"><a href="#我的理解" class="headerlink" title="我的理解"></a>我的理解</h2><p>1.首先对于我这菜鸟来说，目前并不打算去投入大量精力去学习Kotlin,但肯定会了解下简单的语法，不至于再一脸懵逼。（我的爬坑之路任重而道远啊！）<br>2.既然官方都支持了，那么我们没有理由不去学习，只有不断学习，才能不被这个社会淘汰。Kotlin的简洁，轻，快，会带来许多好处。翟刚大神也说过，不要和版本作对。<br>3.恩……就是这样。</p>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/Android/" rel="tag"># Android</a>
              <a href="/tags/Kotlin/" rel="tag"># Kotlin</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2017/05/12/%E4%BB%8E%E6%BA%90%E7%A0%81%E6%9D%A5%E7%9C%8BgetReadableDatabase()%E7%9A%84%E8%AF%AF%E5%8C%BA/" rel="prev" title="从源码来看getReadableDatabase()的误区">
      <i class="fa fa-chevron-left"></i> 从源码来看getReadableDatabase()的误区
    </a></div>
      <div class="post-nav-item">
    <a href="/2017/05/12/Android%20Studio%EF%BC%9A%E6%83%B3%E8%A6%81%E4%BA%8B%E5%8D%8A%E5%8A%9F%E5%80%8D%EF%BC%8C%E4%BD%A0%E9%9C%80%E8%A6%81%E8%AE%B0%E4%BD%8F%E8%BF%99%E4%BA%9B%E5%BF%AB%E6%8D%B7%E9%94%AE/" rel="next" title="Android Studio：想要事半功倍，你需要记住这些快捷键">
      Android Studio：想要事半功倍，你需要记住这些快捷键 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%99%BE%E5%BA%A6%E7%99%BE%E7%A7%91%EF%BC%9A"><span class="nav-number">1.</span> <span class="nav-text">百度百科：</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%98%E6%96%B9%E8%B5%84%E6%96%99"><span class="nav-number">2.</span> <span class="nav-text">官方资料</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E9%B8%BF%E6%B4%8B%E5%A4%A7%E7%A5%9E%EF%BC%9A"><span class="nav-number">3.</span> <span class="nav-text">鸿洋大神：</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%BC%A0%E6%B6%9B%E5%A4%A7%E7%A5%9E"><span class="nav-number">4.</span> <span class="nav-text">张涛大神</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%A4%A7%E7%B2%BE-wing%E7%9A%84%E5%9C%B0%E6%96%B9%E9%85%92%E9%A6%86"><span class="nav-number">5.</span> <span class="nav-text">大精-wing的地方酒馆</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%88%91%E7%9A%84%E7%90%86%E8%A7%A3"><span class="nav-number">6.</span> <span class="nav-text">我的理解</span></a></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">vchao</p>
  <div class="site-description" itemprop="description">怀揣好奇，梦想改变世界的菜鸟极客</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">46</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
        <span class="site-state-item-count">4</span>
        <span class="site-state-item-name">分类</span>
      </div>
      <div class="site-state-item site-state-tags">
        <span class="site-state-item-count">27</span>
        <span class="site-state-item-name">标签</span>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        
  <div class="beian"><a href="https://beian.miit.gov.cn/" rel="noopener" target="_blank">冀ICP备 17022751号-1 </a>
      <img src="https://beian.miit.gov.cn" style="display: inline-block;">
  </div>

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">vchao</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://muse.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Muse</a> 强力驱动
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/muse.js"></script>


<script src="/js/next-boot.js"></script>




  















  

  

</body>
</html>
